#include <QtGui>
#include "DataModel.h"
#include "WinMain.h"
#include "WidSybilView.h"
#include "scImpl.h"

#define FCT "WidSybilView::WidSybilView"
WidSybilView::WidSybilView(QWidget * parent) :
	QWidget(parent), transId(0)
{
	setAttribute(Qt::WA_DeleteOnClose);
	connect(DataModel::get(), SIGNAL(dataChangedSig(unsigned long)), this, SLOT(dataChangedSl(unsigned long)));
	connect(DataModel::get(), SIGNAL(dataMarkSig()), this, SLOT(dataMarkSl()));
}

#undef FCT
#define FCT "WidSybilView::~WidSybilView"
WidSybilView::~WidSybilView()
{
}

#undef FCT
#define FCT "WidSybilView::mousePressEvent"
/*
void WidSybilView::mousePressEvent(QMouseEvent * event)
{
	ctrc(Trc::LOOP,APP,FCT)<<"start"<<endl;
	emit viewClicked(this);
	QWidget::mouseReleaseEvent(event);
}
*/

#undef FCT
#define FCT "WidSybilView::event"
bool WidSybilView::event(QEvent * event)
{
	//ctrc(Trc::LOOP,APP,FCT)<<"start"<<endl;
	if(!isEnabled() && dynamic_cast<QMouseEvent*>(event))
		emit disabledViewClicked(this);
	return QWidget::event(event);
}
